home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
One Stop CD-SHOP - The 50 Pack
/
One Stop CD-Shop - The 50 Pack (1995)(SoftKey)[compilation].iso
/
programs
/
calendar
/
setup
/
disk1
/
msdetect.inc
< prev
next >
Wrap
Text File
|
1994-01-27
|
3KB
|
67 lines
DECLARE FUNCTION CbGetVersionOfFile LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
DECLARE FUNCTION LGetVersionNthField LIB "msdetstf.dll" (szVersion$, nField%) AS LONG
DECLARE FUNCTION LcbFreeDrive LIB "msdetstf.dll" (nDrive%) AS LONG
DECLARE FUNCTION FDirExists LIB "msdetstf.dll" (szDir$) AS INTEGER
DECLARE FUNCTION FDoesFileExist LIB "msdetstf.dll" (szFileName$, mode%) AS INTEGER
DECLARE FUNCTION CbGetIniKeyString LIB "msdetstf.dll" (szFile$, szSect$, szKey$, szBuf$, cbBuf%) AS INTEGER
DECLARE FUNCTION CbFindFileInTree LIB "msdetstf.dll" (szFile$, szDir$, szBuf$, cbBuf%) AS INTEGER
DECLARE FUNCTION GetFreeSpaceForDrive (szDrive$) AS LONG
DECLARE FUNCTION DoesFileExist (szFile$, mode%) AS INTEGER
DECLARE FUNCTION FindFileInTree (szFile$, szDir$) AS STRING
DECLARE FUNCTION DoesDirExist (szDir$) AS INTEGER
DECLARE FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) AS STRING
DECLARE FUNCTION GetVersionOfFile (szFile$) AS STRING
DECLARE FUNCTION GetVersionNthField (szVersion$, nField%) AS LONG
'' 101 FUNCTION GetTotalSpaceForDrive (szDrive$) STATIC AS LONG
'' 101 GetTotalSpaceForDrive = LcbTotalDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
'' 101 END FUNCTION
FUNCTION GetFreeSpaceForDrive (szDrive$) STATIC AS LONG
GetFreeSpaceForDrive = LcbFreeDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
FUNCTION DoesFileExist (szFileName$, mode%) STATIC AS INTEGER
DoesFileExist = FDoesFileExist(szFileName$, mode%)
END FUNCTION
FUNCTION FindFileInTree (szFile$, szDir$) STATIC AS STRING
cb% = 512
szBuf$ = STRING$(cb%, 32)
cbRet% = CbFindFileInTree(szFile$, szDir$, szBuf$, cb%)
FindFileInTree = szBuf$
szBuf$ = ""
END FUNCTION
FUNCTION DoesDirExist (szDir$) STATIC AS INTEGER
DoesDirExist = FDirExists(szDir$)
END FUNCTION
FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) STATIC AS STRING
cb% = 512
szBuf$ = STRING$(cb%, 32)
cbRet% = CbGetIniKeyString(szFile$, szSect$, szKey$, szBuf$, cb%)
GetIniKeyString = szBuf$
szBuf$ = ""
END FUNCTION
'*************************************************************************
FUNCTION GetVersionOfFile (szFile$) STATIC AS STRING
cb% = 30
szBuf$ = STRING$(cb%, 32)
cbRet% = CbGetVersionOfFile(szFile$, szBuf$, cb%)
GetVersionOfFile = szBuf$
szBuf$ = ""
END FUNCTION
'*************************************************************************
FUNCTION GetVersionNthField (szVersion$, nField%) STATIC AS LONG
'$ifdef DEBUG
if (nField% < 1) OR (nField% > 4) then
BadArgErr 2, "GetVersionNthField", szVersion$+", "+STR$(nField%)
end if
'$endif ''DEBUG
GetVersionNthField = LGetVersionNthField(szVersion$, nField%)
END FUNCTION